package VO;

import java.util.Date;

import Po.Equivalent;

public class EquivalentVO{

	Equivalent sup;
	
	public EquivalentVO(Date startDate, Date endDate, Date startPresentDate,
			Date endPresentDate, int id, double money, double rate) {
		sup = new Equivalent(new java.sql.Date(startDate.getTime()), new java.sql.Date(endDate.getTime()), 
				new java.sql.Date(startPresentDate.getTime()), new java.sql.Date(endPresentDate.getTime()), id, money, rate);
	}
	
	public Equivalent toEquivalentPO(){
		return sup;
	}
	
	public static EquivalentVO toEquivalentVO(Equivalent e){
		return new EquivalentVO(e.startDate,e.endDate,e.startPresentDate,e.endPresentDate,
				e.ID,e.money,e.rate);
	}

}
